Skip to content

fix: Fix gpt-5.6-sol 'ultra' reasoning effort: API rejects effort='ultra' (400) — map to a valid value#400

Open
andrei-hasna wants to merge 1 commit into
mainfrom
factory/b33d303f-913a-43c3-812f-0a10dfa3-957d27a2
Open

fix: Fix gpt-5.6-sol 'ultra' reasoning effort: API rejects effort='ultra' (400) — map to a valid value#400
andrei-hasna wants to merge 1 commit into
mainfrom
factory/b33d303f-913a-43c3-812f-0a10dfa3-957d27a2

Conversation

@andrei-hasna

Copy link
Copy Markdown
Contributor

Objective

Fix gpt-5.6-sol 'ultra' reasoning effort: API rejects effort='ultra' (400) — map to a valid value

Bug: selecting the gpt-5.6-sol 'ultra' reasoning tier sends reasoning.effort='ultra' and the model endpoint returns HTTP 400: '[reasoning.effort][invalid_enum_value] Invalid value: ultra. Supported values: none, minimal, low, medium, high, xhigh, max'. codewith exposes an 'ultra' tier but 'ultra' is not a valid API effort. FIX so gpt-5.6-sol-ultra works: translate the codewith 'ultra' effort to a valid wire value (max or xhigh) when building the request, keeping 'ultra' as the user-facing label if desired; or define the sol-ultra preset to use a valid effort. Investigate (cite file:line): ReasoningEffort enum has a Custom(String) variant; effort is serialized to the wire at codex-rs/core/src/session/turn_context.rs:159 via effort.to_string(); model/effort presets live in codex-rs/known-provider-models/ (e.g. lib.rs / zai.rs use ReasoningEffort::Custom("max")); precedent for mapping max->xhigh at codex-rs/external-agent-migration/src/lib.rs:1211. Add a regression test asserting the outgoing request never carries an unsupported effort enum for sol-ultra. The agent MUST start a goal plan and drive it node by node (required). Build and test on remote Blacksmith ONLY (never compile locally); keep cargo fmt (--config imports_granularity=Item), clippy --tests --all-targets -D warnings, and prettier clean; land a PR into hasna/codewith main.

Verification

  • install: pass

Run run_e131b236201f · backend codewith · task b33d303f-913a-43c3-812f-0a10dfa3f6e0
🏭 Generated by @hasnaxyz/factory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant